//
//  URLRouterManager.h
//  Router
//
//  Created by zhubangqian on 2018/2/23.
//  Copyright © 2018年 zhubangqian. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "URLRouterRuleProtocol.h"

@interface URLRouterManager : NSObject

+ (instancetype)shareInstance;

/**
 执行URL跳转
 
 @param urlString 例如：openajk://m.anjuke.com/secondhouse/price_report?id=*&type=*
 */
- (void)execute:(NSString *)urlString;

/**
 增加一条routeRule规则
 
 @param rule 实现Rule协议的类
 */
- (void)addRouterRule:(id<URLRouterRuleProtocol>)rule;

/**
 执行URL跳转
 
 @param rulePath URL的path
 @param params 跳转带过来的参数
 */
- (void)execute:(NSString *)rulePath params:(id)params;

/**
 执行URL跳转

 @param rulePath URL的path
 @param params 跳转带过来的参数
 @param completeBlock 回调
 */
- (void)execute:(NSString *)rulePath params:(id)params complete:(void(^)(id))completeBlock;

@end
